<div class="bjui-pageContent">
    <form action="{{url('admin/catalog/edit')}}" id="catalog_edit" data-toggle="validate" data-alertmsg="false">
        <input type="hidden" name="id" value="{{$catalog->id}}">
        <input type="hidden" name="_token" value="{{ csrf_token() }}">
        <table class="table table-bordered">
            <tbody>
            <tr>
                <td class="col-sm-2 right">
                    <label for="name">名称：</label>
                </td>
                <td>
                    <input name="name" id="name" type="text" value="{{$catalog->name}}" data-rule="required" size="15">
                </td>
            </tr>
            <tr>
                <td class="col-sm-2 right">
                    <label for="p_id">上级地区：</label>
                </td>
                <td>
                    <select name="p_id" id="p_id" data-toggle="selectpicker">
                        <option></option>
                        @foreach($p_catalogs as $p_catalog)
                            <option value="{{$p_catalog->id}}" <?=$p_catalog->id == $catalog->p_id ? 'selected' : ''?>>{{$p_catalog->name}}</option>
                        @endforeach
                    </select>
                </td>
            </tr>
            </tbody>
        </table>
    </form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li>
            <button type="button" class="btn-close" data-icon="close">取消</button>
        </li>
        <li>
            <button type="submit" class="btn-default" data-icon="save">保存</button>
        </li>
    </ul>
</div>